/*
 * @Author: Wxx
 * @Date: 2022-02-21 14:38:17
 * @LastEditors: Wxx
 * @LastEditTime: 2022-02-25 17:53:44
 * @Description:
 */
import "./App.css";
import MyRouter from "./04redux学习/router/router";
import TabBar from "./04redux学习/views/components/TabBar";
import { useEffect, useState } from "react";
import store from "./04redux学习/redux/store";
import { BrowserRouter } from "react-router-dom";
function App() {
  const [show, setShow] = useState(false);
  useEffect(() => {
    store.subscribe(() => {
      setShow(store.getState().Tabbar.show);
    });
  }, []);
  return (
    <div className="App">
      <BrowserRouter>
        <MyRouter>{show && <TabBar />}</MyRouter>
      </BrowserRouter>
    </div>
  );
}

export default App;
